package com.demo.feifan;


import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import javax.sql.DataSource;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(DemoApplication.class, args);
        
        // 检查数据源
        DataSource dataSource = context.getBean(DataSource.class);
        System.out.println("DataSource Type: " + dataSource.getClass().getName());
        
        // 检查SqlSessionFactory
        SqlSessionFactory sqlSessionFactory = context.getBean(SqlSessionFactory.class);
        System.out.println("SqlSessionFactory: " + sqlSessionFactory);

    }
}